$(document).ready(function() {
	$('#pwdForm').submit(function(e) {
		e.preventDefault();
		var scode = $('#scode').val();
		var password = $('#password').val();
		$.ajax({
			url: '/api/dlink/vpwd',
			type: 'POST',
			data: {
				"scode":scode,
				"password": password
			},
			success: function(response) {
				if (response.code==200) {
					location.href=response.lurl;
				} else {
					alert('密码不对');
				}
			},
			error: function() {
				alert('出现错误，请重试！');
			}
		});

	});
});